feat(wfctl): add 'plugin marketplace-verify' subcommand#725
Merged
Conversation
Closes workflow#724. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new wfctl plugin marketplace verification command intended to scan GitHub-hosted wfctl.yaml files and suggest whether a plugin registry manifest should be verified or experimental.
Changes:
- Registers
wfctl plugin marketplace-verify. - Adds GitHub CLI-backed code search and JSON/human-readable reporting.
- Adds unit tests for search verdict behavior, URL construction, and error paths.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
cmd/wfctl/plugin.go |
Adds the new plugin subcommand to dispatch and usage output. |
cmd/wfctl/plugin_marketplace_verify.go |
Implements marketplace verification, GitHub search integration, and reporting. |
cmd/wfctl/plugin_marketplace_verify_test.go |
Adds tests for search results, errors, escaping, and endpoint construction. |
Comment on lines
+93
to
+97
| // searchOrgForPluginPins queries the GitHub code-search API for `name: | ||
| // <plugin>` occurrences inside wfctl.yaml files within the org. Returns a | ||
| // list of repo+path strings. | ||
| func searchOrgForPluginPins(ctx context.Context, org, plugin string, ghAPI func(context.Context, string) ([]byte, error)) ([]string, error) { | ||
| query := fmt.Sprintf(`filename:wfctl.yaml org:%s "name: workflow-plugin-%s"`, org, plugin) |
Comment on lines
+20
to
+24
| fs := flag.NewFlagSet("plugin verify", flag.ContinueOnError) | ||
| org := fs.String("org", "GoCodeAlone", "GitHub org to scan") | ||
| jsonOut := fs.Bool("json", false, "Output JSON instead of human-readable text") | ||
| fs.Usage = func() { | ||
| fmt.Fprintf(fs.Output(), `Usage: wfctl plugin verify [options] <plugin-name> |
⏱ Benchmark Results✅ No significant performance regressions detected. benchstat comparison (baseline → PR)
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #724. Scans GoCodeAlone org wfctl.yaml files for plugin pins; suggests manifest status. Backed by gh api. 6 new unit tests cover verdict logic + URL construction + error paths.